/*
 *   Copyright (c) 2010-2022, SIUFUNG
 */
package net.siufung.market.base.tenant.mapper.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.time.LocalDateTime;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;

/**
 * 系统租户配额表
 *
 * @author 陈建峰
 * @since 2022-07-06 14:45:08
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("sys_tenant_quota")
public class TenantQuota implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 配额Key
     */
    @TableField("quota_key")
    @NotBlank(message = "配额Key不能为空!")
    @Length(max=32, message="配额Key长度不大于32!")
    private String quotaKey;

    /**
     * 配额Key文本
     */
    @TableField("quota_key_text")
    @NotBlank(message = "配额Key文本不能为空!")
    @Length(max=64, message="配额Key文本长度不大于64!")
    private String quotaKeyText;

    /**
     * 配额值
     */
    @TableField("quota_value")
    @NotBlank(message = "配额值不能为空!")
    @Length(max=64, message="配额值长度不大于64!")
    private String quotaValue;

    /**
     * 租户Id
     */
    @TableField("tenant_id")
    private Integer tenantId;

    /**
     * 创建人
     */
    @TableField(value = "created_by", fill = FieldFill.INSERT)
    private String createdBy;

    /**
     * 创建时间
     */
    @TableField(value = "created_at", fill = FieldFill.INSERT)
    private LocalDateTime createdAt;

    /**
     * 更新人
     */
    @TableField(value = "updated_by", fill = FieldFill.UPDATE)
    private String updatedBy;

    /**
     * 更新时间
     */
    @TableField(value = "updated_at", fill = FieldFill.UPDATE)
    private LocalDateTime updatedAt;

    /**
     * 数据标识
     */
    @TableField(value = "deleted", fill = FieldFill.INSERT)
    private Boolean deleted;


}
